﻿@model IEnumerable<HdipCricketClub.Models.ClubFixturePlayer>

@{
    ViewBag.Title = "ReinputSelectPlayers";
}

<h2>ReinputSelectPlayers</h2>

@{
    ViewBag.Title = "Select Players";
    
}

<h2>Select Players for :</h2>
<strong>@ViewBag.team</strong>  vs  <strong>@ViewBag.opponentClub @ViewBag.opponentTeam</strong>
<strong>
    @if(ViewBag.Venue == true)
    {        @: at home
    }
    else
    {
        @: away
    }
    
</strong><br />
on<strong> @ViewBag.date</strong>

@ViewBag.ErrorMessage

<br /><br />

@using (Html.BeginForm("SelectPlayers", "SelectTeam", FormMethod.Post))
{
<table>
    <tr>
        <th>
            Player:
        </th>
        <th>
            Name:
        </th>
        <th>
            Contact:
        </th>
        <th>
            Confirmed:
        </th>
        </tr>
@{var i = 0;}
@foreach(var item in Model)
{
    <tr>
            @Html.HiddenFor(modelItem => item.fixture_id)
            @Html.HiddenFor(modelItem => item.player_no)
        <td>
            @(i + 1)
        </td>
        <td>
            @Html.DropDownList("player_id", String.Empty)
        </td>
        <td>
            @Html.EditorFor(modelItem => item.contact)
        </td>
        <td>
            @Html.EditorFor(modelItem => item.contacted)
       </td>
       </tr>
    i++;
}

</table>
<p>
<input type="submit" value="Save Team" />
</p>
}